package com.tianqu.tms.www.cardect.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tianqu.tms.core.base.Logger;
import com.tianqu.tms.core.base.TmsAction;
import com.tianqu.tms.core.base.UserContext;
import com.tianqu.tms.core.util.StringUtil;
import com.tianqu.tms.core.util.TmsConstants;
import com.tianqu.tms.entity.DectCodes;
import com.tianqu.tms.entity.TmsDetectPic;
import com.tianqu.tms.www.cardect.viewhelper.CarNormalDetectInputViewHelper;
import com.tianqu.tms.www.cardect.viewhelper.CarNormalDetectViewHelper;
/**
 * 基本检测录入检测信息Action
 * 
 * @author tianshifu
 *
 */
public class CarWCDNormalDetectInputAction extends TmsAction {
	private Logger logger = Logger.getLogger(CarWCDNormalDetectInputAction.class);//log
	private static final String DETECT_POSITION = "detect_position";//检测位置，标识哪个button提交
	private static final String DETECT_INPUT_DATA = "detect_input_data";//检测录入信息
	public static final String CARSERIAL = "carSerial";
	public static final String POSITION = "position";//页面传过来的检测位置
	private static final String IMGLIST = "imgList";//用于存放图片对象的list
	
	@Override
	protected ActionForward doAction(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response,
			UserContext uc) throws Exception {
		logger.debug(this.getClass().getName() + "#execute was called.");		
		//每次都进入到这个Action中 进入到这个页面的时候需要传过来一个位置ID 根据位置ID对对应的选项进行添加
		//每次都需要判断是否为空，为空的话过掉
		//从form中获取页面表单
		
		CarNormalDetectInputViewHelper view = new CarNormalDetectInputViewHelper();//返回的时候需要冲uc中取值
		
		String position = "";
		
		String actionForward = "";//点击不同的按钮跳转到不同的路径
		
		if(uc.getAttribute(DETECT_POSITION)==null)
		{
			position = request.getParameter(POSITION);
		}
		else{
			
			position = (String)uc.getAttribute(DETECT_POSITION);
		}
		//修改时页面已经有值，所以需要将页面的值拆分，set到inputViewhelp中
		CarNormalDetectViewHelper topView = (CarNormalDetectViewHelper)uc.getAttribute(DETECT_INPUT_DATA);
		
		
		List<TmsDetectPic> list = (List<TmsDetectPic>)uc.getAttribute(IMGLIST);
		if(list!=null)
		{
			//将list中图片信息set到viewhelp中
			for(int i=0;i<list.size();i++)
			{
				TmsDetectPic entity = (TmsDetectPic)list.get(i);
				//从这里获取图片信息放到viewhelp中
				if(entity.getImgType() == 2)
				{

				if(entity.getImgKey().equals("1"))
				{
					view.setImg1(entity.getImgPath());
				}
				if(entity.getImgKey().equals("2"))
				{
					view.setImg2(entity.getImgPath());
				}
				if(entity.getImgKey().equals("3"))
				{
					view.setImg3(entity.getImgPath());
				}
				if(entity.getImgKey().equals("4"))
				{
					view.setImg4(entity.getImgPath());
				}
				if(entity.getImgKey().equals("5"))
				{
					view.setImg5(entity.getImgPath());
				}
				if(entity.getImgKey().equals("6"))
				{
					view.setImg6(entity.getImgPath());
				}
				if(entity.getImgKey().equals("7"))
				{
					view.setImg7(entity.getImgPath());
				}
				if(entity.getImgKey().equals("8"))
				{
					view.setImg8(entity.getImgPath());
				}
				if(entity.getImgKey().equals("9"))
				{
					view.setImg9(entity.getImgPath());
				}
				if(entity.getImgKey().equals("10"))
				{
					view.setImg10(entity.getImgPath());
				}
				if(entity.getImgKey().equals("11"))
				{
					view.setImg11(entity.getImgPath());
				}
				if(entity.getImgKey().equals("12"))
				{
					view.setImg12(entity.getImgPath());
				}
				if(entity.getImgKey().equals("13"))
				{
					view.setImg13(entity.getImgPath());
				}
				if(entity.getImgKey().equals("14"))
				{
					view.setImg14(entity.getImgPath());
				}
				if(entity.getImgKey().equals("15"))
				{
					view.setImg15(entity.getImgPath());
				}
				if(entity.getImgKey().equals("16"))
				{
					view.setImg16(entity.getImgPath());
				}
				if(entity.getImgKey().equals("17"))
				{
					view.setImg17(entity.getImgPath());
				}
				if(entity.getImgKey().equals("18"))
				{
					view.setImg18(entity.getImgPath());
				}
				if(entity.getImgKey().equals("19"))
				{
					view.setImg19(entity.getImgPath());
				}
				if(entity.getImgKey().equals("20"))
				{
					view.setImg20(entity.getImgPath());
				}
				if(entity.getImgKey().equals("21"))
				{
					view.setImg21(entity.getImgPath());
				}
				if(entity.getImgKey().equals("22"))
				{
					view.setImg22(entity.getImgPath());
				}
				if(entity.getImgKey().equals("23"))
				{
					view.setImg23(entity.getImgPath());
				}
				if(entity.getImgKey().equals("24"))
				{
					view.setImg24(entity.getImgPath());
				}
				if(entity.getImgKey().equals("25"))
				{
					view.setImg25(entity.getImgPath());
				}
				if(entity.getImgKey().equals("26"))
				{
					view.setImg26(entity.getImgPath());
				}
				if(entity.getImgKey().equals("27"))
				{
					view.setImg27(entity.getImgPath());
				}
				if(entity.getImgKey().equals("28"))
				{
					view.setImg28(entity.getImgPath());
				}
				if(entity.getImgKey().equals("29"))
				{
					view.setImg29(entity.getImgPath());
				}
				if(entity.getImgKey().equals("30"))
				{
					view.setImg30(entity.getImgPath());
				}
				if(entity.getImgKey().equals("31"))
				{
					view.setImg31(entity.getImgPath());
				}
				if(entity.getImgKey().equals("32"))
				{
					view.setImg32(entity.getImgPath());
				}
				if(entity.getImgKey().equals("33"))
				{
					view.setImg33(entity.getImgPath());
				}
				if(entity.getImgKey().equals("34"))
				{
					view.setImg34(entity.getImgPath());
				}
				if(entity.getImgKey().equals("35"))
				{
					view.setImg35(entity.getImgPath());
				}
				if(entity.getImgKey().equals("36"))
				{
					view.setImg36(entity.getImgPath());
				}
				if(entity.getImgKey().equals("37"))
				{
					view.setImg37(entity.getImgPath());
				}
				if(entity.getImgKey().equals("38"))
				{
					view.setImg38(entity.getImgPath());
				}
				if(entity.getImgKey().equals("39"))
				{
					view.setImg39(entity.getImgPath());
				}
				if(entity.getImgKey().equals("40"))
				{
					view.setImg40(entity.getImgPath());
				}
				if(entity.getImgKey().equals("41"))
				{
					view.setImg41(entity.getImgPath());
				}
				if(entity.getImgKey().equals("42"))
				{
					view.setImg42(entity.getImgPath());
				}
				if(entity.getImgKey().equals("43"))
				{
					view.setImg43(entity.getImgPath());
				}
				if(entity.getImgKey().equals("44"))
				{
					view.setImg44(entity.getImgPath());
				}
				if(entity.getImgKey().equals("45"))
				{
					view.setImg45(entity.getImgPath());
				}
				if(entity.getImgKey().equals("46"))
				{
					view.setImg46(entity.getImgPath());
				}
				if(entity.getImgKey().equals("47"))
				{
					view.setImg47(entity.getImgPath());
				}
				if(entity.getImgKey().equals("48"))
				{
					view.setImg48(entity.getImgPath());
				}
				if(entity.getImgKey().equals("49"))
				{
					view.setImg49(entity.getImgPath());
				}
				if(entity.getImgKey().equals("50"))
				{
					view.setImg50(entity.getImgPath());
				}
				if(entity.getImgKey().equals("51"))
				{
					view.setImg51(entity.getImgPath());
				}
				if(entity.getImgKey().equals("52"))
				{
					view.setImg52(entity.getImgPath());
				}
				if(entity.getImgKey().equals("53"))
				{
					view.setImg53(entity.getImgPath());
				}
				if(entity.getImgKey().equals("54"))
				{
					view.setImg54(entity.getImgPath());
				}
				if(entity.getImgKey().equals("55"))
				{
					view.setImg55(entity.getImgPath());
				}
				if(entity.getImgKey().equals("56"))
				{
					view.setImg56(entity.getImgPath());
				}
				if(entity.getImgKey().equals("57"))
				{
					view.setImg57(entity.getImgPath());
				}
				if(entity.getImgKey().equals("58"))
				{
					view.setImg58(entity.getImgPath());
				}
				if(entity.getImgKey().equals("59"))
				{
					view.setImg59(entity.getImgPath());
				}
				if(entity.getImgKey().equals("60"))
				{
					view.setImg60(entity.getImgPath());
				}
				if(entity.getImgKey().equals("61"))
				{
					view.setImg61(entity.getImgPath());
				}
				if(entity.getImgKey().equals("62"))
				{
					view.setImg62(entity.getImgPath());
				}
				if(entity.getImgKey().equals("63"))
				{
					view.setImg63(entity.getImgPath());
				}
				if(entity.getImgKey().equals("64"))
				{
					view.setImg64(entity.getImgPath());
				}
				if(entity.getImgKey().equals("65"))
				{
					view.setImg65(entity.getImgPath());
				}
			  }
			}
		}else
		{
			view.setImg1("");
			view.setImg2("");
			view.setImg3("");
			view.setImg4("");
			view.setImg5("");
			view.setImg6("");
			view.setImg7("");
			view.setImg8("");
			view.setImg9("");
			view.setImg10("");
			view.setImg11("");
			view.setImg12("");
			view.setImg13("");
			view.setImg14("");
			view.setImg15("");
			view.setImg16("");
			view.setImg17("");
			view.setImg18("");
			view.setImg19("");
			view.setImg20("");
			view.setImg21("");
			view.setImg22("");
			view.setImg23("");
			view.setImg24("");
			view.setImg25("");
			view.setImg26("");
			view.setImg27("");
			view.setImg28("");
			view.setImg29("");
			view.setImg30("");
			view.setImg31("");
			view.setImg32("");
			view.setImg33("");
			view.setImg34("");
			view.setImg35("");
			view.setImg36("");
			view.setImg37("");
			view.setImg38("");
			view.setImg39("");
			view.setImg40("");
			view.setImg41("");
			view.setImg42("");
			view.setImg43("");
			view.setImg44("");
			view.setImg45("");
			view.setImg46("");
			view.setImg47("");
			view.setImg48("");
			view.setImg49("");
			view.setImg50("");
			view.setImg51("");
			view.setImg52("");
			view.setImg53("");
			view.setImg54("");
			view.setImg55("");
			view.setImg56("");
			view.setImg57("");
			view.setImg58("");
			view.setImg59("");
			view.setImg60("");
			view.setImg61("");
			view.setImg62("");
			view.setImg63("");
			view.setImg64("");
			view.setImg65("");
		}
		//根据位置跳转到不同的页面
		//根据不同位置将首页viewhelp中的值拆分set到录入页中
		if(position.equals("1"))
		{
			//一、左前门检测录入
			view.setFrontLeftChkS1(StringUtil.subStrTool(topView.getFrontLeftChk1()));
			view.setFrontLeftChkS2(StringUtil.subStrTool(topView.getFrontLeftChk2()));
			view.setFrontLeftChkS3(StringUtil.subStrTool(topView.getFrontLeftChk3()));
			view.setFrontLeftChkS4(StringUtil.subStrTool(topView.getFrontLeftChk4()));
			view.setFrontLeftChkS5(StringUtil.subStrTool(topView.getFrontLeftChk5()));
			view.setFrontLeftChkS6(StringUtil.subStrTool(topView.getFrontLeftChk6()));
			view.setFrontLeftChkS7(StringUtil.subStrTool(topView.getFrontLeftChk7()));
			view.setFrontLeftChkS8(StringUtil.subStrTool(topView.getFrontLeftChk8()));
			view.setFrontLeftChkS9(StringUtil.subStrTool(topView.getFrontLeftChk9()));
			
			view.setFrontLeftChkC1(StringUtil.subStrTool2(topView.getFrontLeftChk1()));
			view.setFrontLeftChkC2(StringUtil.subStrTool2(topView.getFrontLeftChk2()));
			view.setFrontLeftChkC3(StringUtil.subStrTool2(topView.getFrontLeftChk3()));
			view.setFrontLeftChkC4(StringUtil.subStrTool2(topView.getFrontLeftChk4()));
			view.setFrontLeftChkC5(StringUtil.subStrTool2(topView.getFrontLeftChk5()));
			view.setFrontLeftChkC6(StringUtil.subStrTool2(topView.getFrontLeftChk6()));
			view.setFrontLeftChkC7(StringUtil.subStrTool2(topView.getFrontLeftChk7()));
			view.setFrontLeftChkC8(StringUtil.subStrTool2(topView.getFrontLeftChk8()));
			view.setFrontLeftChkC9(StringUtil.subStrTool2(topView.getFrontLeftChk9()));

			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position1";
			uc.setAttribute(DETECT_POSITION, "1");
			
		}
		if(position.equals("2"))
		{
			//二、内饰检测录入
			view.setInsideChkS1(StringUtil.subStrTool(topView.getInsideChk1()));
			view.setInsideChkS2(StringUtil.subStrTool(topView.getInsideChk2()));
			view.setInsideChkS3(StringUtil.subStrTool(topView.getInsideChk3()));
			view.setInsideChkS4(StringUtil.subStrTool(topView.getInsideChk4()));
			view.setInsideChkS5(StringUtil.subStrTool(topView.getInsideChk5()));
			view.setInsideChkS6(StringUtil.subStrTool(topView.getInsideChk6()));
			view.setInsideChkS7(StringUtil.subStrTool(topView.getInsideChk7()));
			view.setInsideChkS8(StringUtil.subStrTool(topView.getInsideChk8()));
			view.setInsideChkS9(StringUtil.subStrTool(topView.getInsideChk9()));
			view.setInsideChkS10(StringUtil.subStrTool(topView.getInsideChk10()));
			view.setInsideChkS11(StringUtil.subStrTool(topView.getInsideChk11()));
			view.setInsideChkS12(StringUtil.subStrTool(topView.getInsideChk12()));
			view.setInsideChkS13(StringUtil.subStrTool(topView.getInsideChk13()));
			view.setInsideChkS14(StringUtil.subStrTool(topView.getInsideChk14()));
			view.setInsideChkS15(StringUtil.subStrTool(topView.getInsideChk15()));
			view.setInsideChkS16(StringUtil.subStrTool(topView.getInsideChk16()));
			view.setInsideChkS17(StringUtil.subStrTool(topView.getInsideChk17()));
			view.setInsideChkS18(StringUtil.subStrTool(topView.getInsideChk18()));
			view.setInsideChkS19(StringUtil.subStrTool(topView.getInsideChk19()));
			view.setInsideChkS20(StringUtil.subStrTool(topView.getInsideChk20()));
			view.setInsideChkS21(StringUtil.subStrTool(topView.getInsideChk21()));
			view.setInsideChkS22(StringUtil.subStrTool(topView.getInsideChk22()));
			view.setInsideChkS23(StringUtil.subStrTool(topView.getInsideChk23()));
			view.setInsideChkS24(StringUtil.subStrTool(topView.getInsideChk24()));
			view.setInsideChkS25(StringUtil.subStrTool(topView.getInsideChk25()));
			view.setInsideChkS26(StringUtil.subStrTool(topView.getInsideChk26()));
			view.setInsideChkS27(StringUtil.subStrTool(topView.getInsideChk27()));
			view.setInsideChkS28(StringUtil.subStrTool(topView.getInsideChk28()));
			view.setInsideChkS29(StringUtil.subStrTool(topView.getInsideChk29()));
			view.setInsideChkS30(StringUtil.subStrTool(topView.getInsideChk30()));
			
			view.setInsideChkC1(StringUtil.subStrTool2(topView.getInsideChk1()));
			view.setInsideChkC2(StringUtil.subStrTool2(topView.getInsideChk2()));
			view.setInsideChkC3(StringUtil.subStrTool2(topView.getInsideChk3()));
			view.setInsideChkC4(StringUtil.subStrTool2(topView.getInsideChk4()));
			view.setInsideChkC5(StringUtil.subStrTool2(topView.getInsideChk5()));
			view.setInsideChkC6(StringUtil.subStrTool2(topView.getInsideChk6()));
			view.setInsideChkC7(StringUtil.subStrTool2(topView.getInsideChk7()));
			view.setInsideChkC8(StringUtil.subStrTool2(topView.getInsideChk8()));
			view.setInsideChkC9(StringUtil.subStrTool2(topView.getInsideChk9()));
			view.setInsideChkC10(StringUtil.subStrTool2(topView.getInsideChk10()));
			view.setInsideChkC11(StringUtil.subStrTool2(topView.getInsideChk11()));
			view.setInsideChkC12(StringUtil.subStrTool2(topView.getInsideChk12()));
			view.setInsideChkC13(StringUtil.subStrTool2(topView.getInsideChk13()));
			view.setInsideChkC14(StringUtil.subStrTool2(topView.getInsideChk14()));
			view.setInsideChkC15(StringUtil.subStrTool2(topView.getInsideChk15()));
			view.setInsideChkC16(StringUtil.subStrTool2(topView.getInsideChk16()));
			view.setInsideChkC17(StringUtil.subStrTool2(topView.getInsideChk17()));
			view.setInsideChkC18(StringUtil.subStrTool2(topView.getInsideChk18()));
			view.setInsideChkC19(StringUtil.subStrTool2(topView.getInsideChk19()));
			view.setInsideChkC20(StringUtil.subStrTool2(topView.getInsideChk20()));
			view.setInsideChkC21(StringUtil.subStrTool2(topView.getInsideChk21()));
			view.setInsideChkC22(StringUtil.subStrTool2(topView.getInsideChk22()));
			view.setInsideChkC23(StringUtil.subStrTool2(topView.getInsideChk23()));
			view.setInsideChkC24(StringUtil.subStrTool2(topView.getInsideChk24()));
			view.setInsideChkC25(StringUtil.subStrTool2(topView.getInsideChk25()));
			view.setInsideChkC26(StringUtil.subStrTool2(topView.getInsideChk26()));
			view.setInsideChkC27(StringUtil.subStrTool2(topView.getInsideChk27()));
			view.setInsideChkC28(StringUtil.subStrTool2(topView.getInsideChk28()));
			view.setInsideChkC29(StringUtil.subStrTool2(topView.getInsideChk29()));
			view.setInsideChkC30(StringUtil.subStrTool2(topView.getInsideChk30()));

			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position2";
			uc.setAttribute(DETECT_POSITION, "2");
		}
		if(position.equals("3"))
		{
			//三、左前翼子板检测录入
			view.setPanelFenerLhChkS1(StringUtil.subStrTool(topView.getPanelFenerLhChk1()));
			view.setPanelFenerLhChkS2(StringUtil.subStrTool(topView.getPanelFenerLhChk2()));
			view.setPanelFenerLhChkS3(StringUtil.subStrTool(topView.getPanelFenerLhChk3()));
			view.setPanelFenerLhChkS4(StringUtil.subStrTool(topView.getPanelFenerLhChk4()));
			view.setPanelFenerLhChkS5(StringUtil.subStrTool(topView.getPanelFenerLhChk5()));
			view.setPanelFenerLhChkS6(StringUtil.subStrTool(topView.getPanelFenerLhChk6()));
			
			view.setPanelFenerLhChkC1(StringUtil.subStrTool2(topView.getPanelFenerLhChk1()));
			view.setPanelFenerLhChkC2(StringUtil.subStrTool2(topView.getPanelFenerLhChk2()));
			view.setPanelFenerLhChkC3(StringUtil.subStrTool2(topView.getPanelFenerLhChk3()));
			view.setPanelFenerLhChkC4(StringUtil.subStrTool2(topView.getPanelFenerLhChk4()));
			view.setPanelFenerLhChkC5(StringUtil.subStrTool2(topView.getPanelFenerLhChk5()));
			view.setPanelFenerLhChkC6(StringUtil.subStrTool2(topView.getPanelFenerLhChk6()));			
			
			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position3";
			uc.setAttribute(DETECT_POSITION, "3");
		}
		if(position.equals("4"))
		{
			//四、正前面检测录入
			view.setDeadAheadChkS1(StringUtil.subStrTool(topView.getDeadAheadChk1()));
			view.setDeadAheadChkS2(StringUtil.subStrTool(topView.getDeadAheadChk2()));
			view.setDeadAheadChkS3(StringUtil.subStrTool(topView.getDeadAheadChk3()));
			view.setDeadAheadChkS4(StringUtil.subStrTool(topView.getDeadAheadChk4()));
			view.setDeadAheadChkS5(StringUtil.subStrTool(topView.getDeadAheadChk5()));
			view.setDeadAheadChkS6(StringUtil.subStrTool(topView.getDeadAheadChk6()));
			
			view.setDeadAheadChkC1(StringUtil.subStrTool2(topView.getDeadAheadChk1()));
			view.setDeadAheadChkC2(StringUtil.subStrTool2(topView.getDeadAheadChk2()));
			view.setDeadAheadChkC3(StringUtil.subStrTool2(topView.getDeadAheadChk3()));
			view.setDeadAheadChkC4(StringUtil.subStrTool2(topView.getDeadAheadChk4()));
			view.setDeadAheadChkC5(StringUtil.subStrTool2(topView.getDeadAheadChk5()));
			view.setDeadAheadChkC6(StringUtil.subStrTool2(topView.getDeadAheadChk6()));
			
			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position4";
			uc.setAttribute(DETECT_POSITION, "4");
		}
		if(position.equals("5"))
		{
			//五、发动机舱内检测录入
			view.setEngineChkS1(StringUtil.subStrTool(topView.getEngineChk1()));
			view.setEngineChkS2(StringUtil.subStrTool(topView.getEngineChk2()));
			view.setEngineChkS3(StringUtil.subStrTool(topView.getEngineChk3()));
			view.setEngineChkS4(StringUtil.subStrTool(topView.getEngineChk4()));
			view.setEngineChkS5(StringUtil.subStrTool(topView.getEngineChk5()));
			view.setEngineChkS6(StringUtil.subStrTool(topView.getEngineChk6()));
			view.setEngineChkS7(StringUtil.subStrTool(topView.getEngineChk7()));
			view.setEngineChkS8(StringUtil.subStrTool(topView.getEngineChk8()));
			
			view.setEngineChkC1(StringUtil.subStrTool2(topView.getEngineChk1()));
			view.setEngineChkC2(StringUtil.subStrTool2(topView.getEngineChk2()));
			view.setEngineChkC3(StringUtil.subStrTool2(topView.getEngineChk3()));
			view.setEngineChkC4(StringUtil.subStrTool2(topView.getEngineChk4()));
			view.setEngineChkC5(StringUtil.subStrTool2(topView.getEngineChk5()));
			view.setEngineChkC6(StringUtil.subStrTool2(topView.getEngineChk6()));
			view.setEngineChkC7(StringUtil.subStrTool2(topView.getEngineChk7()));
			view.setEngineChkC8(StringUtil.subStrTool2(topView.getEngineChk8()));
			
			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position5";
			uc.setAttribute(DETECT_POSITION, "5");
		}
		if(position.equals("6"))
		{
			 //六、右前翼子板检测录入
			view.setPanelFenerRhChkS1(StringUtil.subStrTool(topView.getPanelFenerRhChk1()));
			view.setPanelFenerRhChkS2(StringUtil.subStrTool(topView.getPanelFenerRhChk2()));
			view.setPanelFenerRhChkS3(StringUtil.subStrTool(topView.getPanelFenerRhChk3()));
			view.setPanelFenerRhChkS4(StringUtil.subStrTool(topView.getPanelFenerRhChk4()));
			view.setPanelFenerRhChkS5(StringUtil.subStrTool(topView.getPanelFenerRhChk5()));
			view.setPanelFenerRhChkS6(StringUtil.subStrTool(topView.getPanelFenerRhChk6()));
			
			view.setPanelFenerRhChkC1(StringUtil.subStrTool2(topView.getPanelFenerRhChk1()));
			view.setPanelFenerRhChkC2(StringUtil.subStrTool2(topView.getPanelFenerRhChk2()));
			view.setPanelFenerRhChkC3(StringUtil.subStrTool2(topView.getPanelFenerRhChk3()));
			view.setPanelFenerRhChkC4(StringUtil.subStrTool2(topView.getPanelFenerRhChk4()));
			view.setPanelFenerRhChkC5(StringUtil.subStrTool2(topView.getPanelFenerRhChk5()));
			view.setPanelFenerRhChkC6(StringUtil.subStrTool2(topView.getPanelFenerRhChk6()));
			
			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position6";
			uc.setAttribute(DETECT_POSITION, "6");
		}
		if(position.equals("7"))
		{
			//七、右前门检测录入
			view.setFrontRightChkS1(StringUtil.subStrTool(topView.getFrontRightChk1()));
			view.setFrontRightChkS2(StringUtil.subStrTool(topView.getFrontRightChk2()));
			view.setFrontRightChkS3(StringUtil.subStrTool(topView.getFrontRightChk3()));
			view.setFrontRightChkS4(StringUtil.subStrTool(topView.getFrontRightChk4()));
			view.setFrontRightChkS5(StringUtil.subStrTool(topView.getFrontRightChk5()));
			view.setFrontRightChkS6(StringUtil.subStrTool(topView.getFrontRightChk6()));
			view.setFrontRightChkS7(StringUtil.subStrTool(topView.getFrontRightChk7()));
			view.setFrontRightChkS8(StringUtil.subStrTool(topView.getFrontRightChk8()));
			view.setFrontRightChkS9(StringUtil.subStrTool(topView.getFrontRightChk9()));
			view.setFrontRightChkS10(StringUtil.subStrTool(topView.getFrontRightChk10()));
			view.setFrontRightChkS11(StringUtil.subStrTool(topView.getFrontRightChk11()));
			view.setFrontRightChkS12(StringUtil.subStrTool(topView.getFrontRightChk12()));
			view.setFrontRightChkS13(StringUtil.subStrTool(topView.getFrontRightChk13()));
			
			view.setFrontRightChkC1(StringUtil.subStrTool2(topView.getFrontRightChk1()));
			view.setFrontRightChkC2(StringUtil.subStrTool2(topView.getFrontRightChk2()));
			view.setFrontRightChkC3(StringUtil.subStrTool2(topView.getFrontRightChk3()));
			view.setFrontRightChkC4(StringUtil.subStrTool2(topView.getFrontRightChk4()));
			view.setFrontRightChkC5(StringUtil.subStrTool2(topView.getFrontRightChk5()));
			view.setFrontRightChkC6(StringUtil.subStrTool2(topView.getFrontRightChk6()));
			view.setFrontRightChkC7(StringUtil.subStrTool2(topView.getFrontRightChk7()));
			view.setFrontRightChkC8(StringUtil.subStrTool2(topView.getFrontRightChk8()));
			view.setFrontRightChkC9(StringUtil.subStrTool2(topView.getFrontRightChk9()));
			view.setFrontRightChkC10(StringUtil.subStrTool2(topView.getFrontRightChk10()));
			view.setFrontRightChkC11(StringUtil.subStrTool2(topView.getFrontRightChk11()));
			view.setFrontRightChkC12(StringUtil.subStrTool2(topView.getFrontRightChk12()));
			view.setFrontRightChkC13(StringUtil.subStrTool2(topView.getFrontRightChk13()));
			
			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position7";
			uc.setAttribute(DETECT_POSITION, "7");
		}
		if(position.equals("8"))
		{
			//八、右后门检测录入
			view.setRearRightChkS1(StringUtil.subStrTool(topView.getRearRightChk1()));
			view.setRearRightChkS2(StringUtil.subStrTool(topView.getRearRightChk2()));
			view.setRearRightChkS3(StringUtil.subStrTool(topView.getRearRightChk3()));
			view.setRearRightChkS4(StringUtil.subStrTool(topView.getRearRightChk4()));
			view.setRearRightChkS5(StringUtil.subStrTool(topView.getRearRightChk5()));
			view.setRearRightChkS6(StringUtil.subStrTool(topView.getRearRightChk6()));
			view.setRearRightChkS7(StringUtil.subStrTool(topView.getRearRightChk7()));
			view.setRearRightChkS8(StringUtil.subStrTool(topView.getRearRightChk8()));
			view.setRearRightChkS9(StringUtil.subStrTool(topView.getRearRightChk9()));
			view.setRearRightChkS10(StringUtil.subStrTool(topView.getRearRightChk10()));
			view.setRearRightChkS11(StringUtil.subStrTool(topView.getRearRightChk11()));
			
			view.setRearRightChkC1(StringUtil.subStrTool2(topView.getRearRightChk1()));
			view.setRearRightChkC2(StringUtil.subStrTool2(topView.getRearRightChk2()));
			view.setRearRightChkC3(StringUtil.subStrTool2(topView.getRearRightChk3()));
			view.setRearRightChkC4(StringUtil.subStrTool2(topView.getRearRightChk4()));
			view.setRearRightChkC5(StringUtil.subStrTool2(topView.getRearRightChk5()));
			view.setRearRightChkC6(StringUtil.subStrTool2(topView.getRearRightChk6()));
			view.setRearRightChkC7(StringUtil.subStrTool2(topView.getRearRightChk7()));
			view.setRearRightChkC8(StringUtil.subStrTool2(topView.getRearRightChk8()));
			view.setRearRightChkC9(StringUtil.subStrTool2(topView.getRearRightChk9()));
			view.setRearRightChkC10(StringUtil.subStrTool2(topView.getRearRightChk10()));
			view.setRearRightChkC11(StringUtil.subStrTool2(topView.getRearRightChk11()));
			
			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position8";
			uc.setAttribute(DETECT_POSITION, "8");
		}
		if(position.equals("9"))
		{
			 //九、右后翼子板检测录入
			view.setFenderRaChkS1(StringUtil.subStrTool(topView.getFenderRaChk1()));
			view.setFenderRaChkS2(StringUtil.subStrTool(topView.getFenderRaChk2()));
			view.setFenderRaChkS3(StringUtil.subStrTool(topView.getFenderRaChk3()));
			view.setFenderRaChkS4(StringUtil.subStrTool(topView.getFenderRaChk4()));
			view.setFenderRaChkS5(StringUtil.subStrTool(topView.getFenderRaChk5()));
			view.setFenderRaChkS6(StringUtil.subStrTool(topView.getFenderRaChk6()));
			
			view.setFenderRaChkC1(StringUtil.subStrTool2(topView.getFenderRaChk1()));
			view.setFenderRaChkC2(StringUtil.subStrTool2(topView.getFenderRaChk2()));
			view.setFenderRaChkC3(StringUtil.subStrTool2(topView.getFenderRaChk3()));
			view.setFenderRaChkC4(StringUtil.subStrTool2(topView.getFenderRaChk4()));
			view.setFenderRaChkC5(StringUtil.subStrTool2(topView.getFenderRaChk5()));
			view.setFenderRaChkC6(StringUtil.subStrTool2(topView.getFenderRaChk6()));
			
			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position9";
			uc.setAttribute(DETECT_POSITION, "9");
		}
		if(position.equals("10"))
		{
			//十、正后面检测录入
			view.setRightAsternChkS1(StringUtil.subStrTool(topView.getRightAsternChk1()));
			view.setRightAsternChkS2(StringUtil.subStrTool(topView.getRightAsternChk2()));
			view.setRightAsternChkS3(StringUtil.subStrTool(topView.getRightAsternChk3()));
			view.setRightAsternChkS4(StringUtil.subStrTool(topView.getRightAsternChk4()));
			view.setRightAsternChkS5(StringUtil.subStrTool(topView.getRightAsternChk5()));
			view.setRightAsternChkS6(StringUtil.subStrTool(topView.getRightAsternChk6()));
			
			view.setRightAsternChkC1(StringUtil.subStrTool2(topView.getRightAsternChk1()));
			view.setRightAsternChkC2(StringUtil.subStrTool2(topView.getRightAsternChk2()));
			view.setRightAsternChkC3(StringUtil.subStrTool2(topView.getRightAsternChk3()));
			view.setRightAsternChkC4(StringUtil.subStrTool2(topView.getRightAsternChk4()));
			view.setRightAsternChkC5(StringUtil.subStrTool2(topView.getRightAsternChk5()));
			view.setRightAsternChkC6(StringUtil.subStrTool2(topView.getRightAsternChk6()));
			
			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position10";
			uc.setAttribute(DETECT_POSITION, "10");
		}
		if(position.equals("11"))
		{
			//十一、行李箱内侧检测录入
			view.setLuggageChkS1(StringUtil.subStrTool(topView.getLuggageChk1()));
			view.setLuggageChkS2(StringUtil.subStrTool(topView.getLuggageChk2()));
			view.setLuggageChkS3(StringUtil.subStrTool(topView.getLuggageChk3()));
			view.setLuggageChkS4(StringUtil.subStrTool(topView.getLuggageChk4()));
			view.setLuggageChkS5(StringUtil.subStrTool(topView.getLuggageChk5()));
			view.setLuggageChkS6(StringUtil.subStrTool(topView.getLuggageChk6()));
			view.setLuggageChkS7(StringUtil.subStrTool(topView.getLuggageChk7()));
			view.setLuggageChkS8(StringUtil.subStrTool(topView.getLuggageChk8()));
			view.setLuggageChkS9(StringUtil.subStrTool(topView.getLuggageChk9()));
			view.setLuggageChkS10(StringUtil.subStrTool(topView.getLuggageChk10()));
			
			view.setLuggageChkC1(StringUtil.subStrTool2(topView.getLuggageChk1()));
			view.setLuggageChkC2(StringUtil.subStrTool2(topView.getLuggageChk2()));
			view.setLuggageChkC3(StringUtil.subStrTool2(topView.getLuggageChk3()));
			view.setLuggageChkC4(StringUtil.subStrTool2(topView.getLuggageChk4()));
			view.setLuggageChkC5(StringUtil.subStrTool2(topView.getLuggageChk5()));
			view.setLuggageChkC6(StringUtil.subStrTool2(topView.getLuggageChk6()));
			view.setLuggageChkC7(StringUtil.subStrTool2(topView.getLuggageChk7()));
			view.setLuggageChkC8(StringUtil.subStrTool2(topView.getLuggageChk8()));
			view.setLuggageChkC9(StringUtil.subStrTool2(topView.getLuggageChk9()));
			view.setLuggageChkC10(StringUtil.subStrTool2(topView.getLuggageChk10()));
			
			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position11";
			uc.setAttribute(DETECT_POSITION, "11");
		}
		if(position.equals("12"))
		{
			 //十二、左后翼子板检测录入
			view.setFenderLaChkS1(StringUtil.subStrTool(topView.getFenderLaChk1()));
			view.setFenderLaChkS2(StringUtil.subStrTool(topView.getFenderLaChk2()));
			view.setFenderLaChkS3(StringUtil.subStrTool(topView.getFenderLaChk3()));
			view.setFenderLaChkS4(StringUtil.subStrTool(topView.getFenderLaChk4()));
			view.setFenderLaChkS5(StringUtil.subStrTool(topView.getFenderLaChk5()));
			view.setFenderLaChkS6(StringUtil.subStrTool(topView.getFenderLaChk6()));
			
			view.setFenderLaChkC1(StringUtil.subStrTool2(topView.getFenderLaChk1()));
			view.setFenderLaChkC2(StringUtil.subStrTool2(topView.getFenderLaChk2()));
			view.setFenderLaChkC3(StringUtil.subStrTool2(topView.getFenderLaChk3()));
			view.setFenderLaChkC4(StringUtil.subStrTool2(topView.getFenderLaChk4()));
			view.setFenderLaChkC5(StringUtil.subStrTool2(topView.getFenderLaChk5()));
			view.setFenderLaChkC6(StringUtil.subStrTool2(topView.getFenderLaChk6()));
			
			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position12";
			uc.setAttribute(DETECT_POSITION, "12");
		}
		if(position.equals("13"))
		{
			//十三、左后门检测录入
			view.setRearLeftChkS1(StringUtil.subStrTool(topView.getRearLeftChk1()));
			view.setRearLeftChkS2(StringUtil.subStrTool(topView.getRearLeftChk2()));
			view.setRearLeftChkS3(StringUtil.subStrTool(topView.getRearLeftChk3()));
			view.setRearLeftChkS4(StringUtil.subStrTool(topView.getRearLeftChk4()));
			view.setRearLeftChkS5(StringUtil.subStrTool(topView.getRearLeftChk5()));
			view.setRearLeftChkS6(StringUtil.subStrTool(topView.getRearLeftChk6()));
			view.setRearLeftChkS7(StringUtil.subStrTool(topView.getRearLeftChk7()));
			view.setRearLeftChkS8(StringUtil.subStrTool(topView.getRearLeftChk8()));
			view.setRearLeftChkS9(StringUtil.subStrTool(topView.getRearLeftChk9()));
			view.setRearLeftChkS10(StringUtil.subStrTool(topView.getRearLeftChk10()));
			view.setRearLeftChkS11(StringUtil.subStrTool(topView.getRearLeftChk11()));
			
			view.setRearLeftChkC1(StringUtil.subStrTool2(topView.getRearLeftChk1()));
			view.setRearLeftChkC2(StringUtil.subStrTool2(topView.getRearLeftChk2()));
			view.setRearLeftChkC3(StringUtil.subStrTool2(topView.getRearLeftChk3()));
			view.setRearLeftChkC4(StringUtil.subStrTool2(topView.getRearLeftChk4()));
			view.setRearLeftChkC5(StringUtil.subStrTool2(topView.getRearLeftChk5()));
			view.setRearLeftChkC6(StringUtil.subStrTool2(topView.getRearLeftChk6()));
			view.setRearLeftChkC7(StringUtil.subStrTool2(topView.getRearLeftChk7()));
			view.setRearLeftChkC8(StringUtil.subStrTool2(topView.getRearLeftChk8()));
			view.setRearLeftChkC9(StringUtil.subStrTool2(topView.getRearLeftChk9()));
			view.setRearLeftChkC10(StringUtil.subStrTool2(topView.getRearLeftChk10()));
			view.setRearLeftChkC11(StringUtil.subStrTool2(topView.getRearLeftChk11()));
			
			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position13";
			uc.setAttribute(DETECT_POSITION, "13");
		}
		if(position.equals("14"))
		{
			//十四、车顶检测录入
			view.setCarRoofChkS1(StringUtil.subStrTool(topView.getCarRoofChk1()));
			view.setCarRoofChkC1(StringUtil.subStrTool2(topView.getCarRoofChk1()));
			
			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position14";
			uc.setAttribute(DETECT_POSITION, "14");
		}
		if(position.equals("15"))
		{
			//十四、检测说明录入
			view.setCarDescribe(topView.getCarDescribe());
			uc.removeAttribute(DETECT_POSITION);
			actionForward = "position15";
			uc.setAttribute(DETECT_POSITION, "15");
		}
		
//		
//		//将上个页面的车辆ID获取重set到viewhelp中
//		String carSerial = (String)uc.getAttribute(CARSERIAL);
		//向viewhelp中set列表list 包括缺陷程度描述和评分 从字典表中取得
		DectCodes code = DectCodes.getInstance();
		//这个需要加在另一个viewhelp中每次打开的 时候需要将页面的值带出来
		view.setCarExteriorList(code.getCodeslistByItemId(DectCodes.CAR_EXTERIOR));//外饰
		view.setCarInteriorList(code.getCodeslistByItemId(DectCodes.CAR_INTERIOR));//内饰
		view.setEngineDriveList(code.getCodeslistByItemId(DectCodes.ENGINE_DRIVE_BRAKING));//发动机传动制动
		view.setElecEquList(code.getCodeslistByItemId(DectCodes.ELECTRONIC_EQUIPMENT));////电子设备 
		view.setCarOtherParts(code.getCodeslistByItemId(DectCodes.CAR_OTHER_PARTS));
		view.setAccdentList(code.getCodeslistByItemId(DectCodes.ACCIDENT_CAR_BODY_CHECK));//事故车见猜测
		view.setDetectLevelList(code.getCodeslistByItemId(DectCodes.SENIOR_CARDECT_ENGINE_CHECK));//缺陷程度
		
		request.setAttribute(TmsConstants.VIEWHELP, view);
		logger.debug(this.getClass().getName() + "#doAction was completed.");
		return mapping.findForward(actionForward);
	}

}
